<%= simple_form_for(@page) do |f| %>
    <%= page_title_with_buttons f %>
    <%= render layout: 'main_with_sidebar' do %>
        <%= hidden_field_tag :section_id, @page.section_id %>
        <%= render :partial => 'main_form', :locals => {:f => f} %>
        <% content_for :sidebar do %>
            <div class="sidebar-block">
              <h4 class="gray">Status &nbsp; <%= draft_icon_tag(@block, force: true) %></h4>
              <% if current_user.able_to?(:publish_content) %>
                  <h4 class="gray label">Visibility</h4>
                  <%= f.input :visibility, label: false, collection: @page.visibilities, prompt: false, input_html: {class: 'input-block-level'} %>
              <% end %>
            </div>
            <div class="sidebar-block">
              <h4 class="gray">Performance Tuning</h4>
              <%= f.input :cacheable, label: "Allow Caching?", hint: "Uncheck to allow for personalized content." %>
            </div>
        <% end %>
    <% end %>
    <%= bottom_buttons f %>
<% end %>
